package com.example.canalclientsync.canal.mapper.db1;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.canalclientsync.canal.po.Dir;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 文件夹相关查询
 *
 * @author chen.cr
 * @since 2023/9/14
 */
@Mapper
public interface DirMapper extends BaseMapper<Dir> {

//    @Select("SELECT * FROM t_dir WHERE id = #{dirId} AND tenant_id = #{tenantId}")
    Dir findByDirIdAndTenantId(Long dirId, String tenantId);

    Dir findByMasterIdAndTenantId(Long masterId, String tenantId);

    /**
     * 查询该表里面的数据总数
     *
     * @return
     */
    Long findAllDataCount();


    /**
     * 分页查询表的数据
     *
     * @return
     */
    List<Dir> findPageData(long offset, long limit);

}
